package com.yalu.entity.data;

import java.io.Serializable;

import javax.persistence.Embeddable;

import org.apache.commons.lang.StringUtils;

@Embeddable
public class WarehousesareaKey implements Serializable{


	private static final long serialVersionUID = 3083984295555252401L;

//	private Long no;
	String code;
	String name;
	String area;
	String city;
	String district;

	@Override
	public boolean equals(Object obj) {
//		if (this == obj) {
//			return true;
//		}
		if (obj == null) {
			return false;
		}
		if (getClass().getPackage() != obj.getClass().getPackage()) {
			return false;
		}
		final WarehousesareaKey other = (WarehousesareaKey) obj;
		return code == other.getCode() && StringUtils.equals(name, other.getName())
				&& area == other.getArea() && StringUtils.equals(city, other.getCity()) 
				&& district == other.getCity();
	}
	
//	@Override
//	public int hashCode() {
//		return no == null ? System.identityHashCode(this) : no.hashCode();
//	}
	
//	public Long getNo() {
//		return no;
//	}
//
//	public void setNo(Long no) {
//		this.no = no;
//	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getDistrict() {
		return district;
	}

	public void setDistrict(String district) {
		this.district = district;
	}

}
